package api.homework03;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionListDemo {
    public static void main(String[] args) {
        Collection c = new ArrayList();
        c.add("1");
        c.add("2");
        c.add("3");
        c.add("4");
        c.add("5");
        System.out.println(c);
        Collection c2 = new ArrayList();
        c2.add("1");
        c2.add("2");
        c2.add("3");
        c2.add("6");
        c2.add("7");
        System.out.println(c2);

        c.addAll(c2);
        System.out.println(c);
        boolean b = c.containsAll(c2);
        System.out.println(b);
        Collection c1 = new ArrayList();
        c.retainAll(c2);
        System.out.println(c);
        c.removeAll(c2);
        System.out.println(c);




    }
}
